#include<stdio.h>
int main()
{
	int i,l,b,d,o;
	char c;
	l=b=d=o=0;

	for(i=1;i<=10;i++){
		c=getchar();
		if(c<='z'&&c>='a'||c<='Z'&&c>='A'){
			l++;
		}
		else if(c==' '||c=='\n'){
			b++;
		}
		else if(c>='0'&&c<='9'){
			d++;
		}
		else {
			o++;
		} 
	}
	printf("letter = %d, blank = %d, digit = %d, other = %d",l,b,d,o);
	return 0;
 } 
